package com.mce.nebula.entity;

import com.mce.nebula.common.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 云市插件实体，对应Python的RainbondCenterPlugin模型
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "rainbond_center_plugin")
public class RainbondCenterPlugin extends BaseEntity {
    
    @Column(name = "plugin_key", length = 32, nullable = false)
    private String pluginKey;
    
    @Column(name = "plugin_name", length = 64, nullable = false)
    private String pluginName;
    
    @Column(name = "plugin_id", length = 32)
    private String pluginId;
    
    @Column(name = "category", length = 32, nullable = false)
    private String category;
    
    @Column(name = "record_id", nullable = false)
    private Integer recordId;
    
    @Column(name = "version", length = 20, nullable = false)
    private String version;
    
    @Column(name = "build_version", length = 32, nullable = false)
    private String buildVersion;
    
    @Column(name = "pic", length = 100)
    private String pic;
    
    @Column(name = "scope", length = 10, nullable = false)
    private String scope; // enterprise, team, goodrain
    
    @Column(name = "source", length = 15)
    private String source;
    
    @Column(name = "share_user", nullable = false)
    private Integer shareUser;
    
    @Column(name = "share_team", length = 32, nullable = false)
    private String shareTeam;
    
    @Column(name = "description", length = 400)
    private String description;
    
    @Column(name = "plugin_template", columnDefinition = "TEXT", nullable = false)
    private String pluginTemplate;
    
    @Column(name = "is_complete", nullable = false)
    private Boolean isComplete = false;
    
    @Column(name = "enterprise_id", length = 32)
    private String enterpriseId = "public";
    
    @Column(name = "details", columnDefinition = "TEXT")
    private String details;
}